Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / feature / node / src / commonMain / kotlin / org / meshtastic / feature / node / component / NodeHopHistogramPreviews.kt

Displaying Raw • Download

feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeHopHistogramPreviews.kt 2d20cd8a4708e2ef66e98d5259f3a97ec93f240a (2d20cd8a) Text, 1.88 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tf0883e@fileTb4b4b4:Te6edf3SuppressTb4b4b4(Ta5d6ff"Ta5d6ffMagicNumberTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffPreviewPublicTa5d6ff"Tb4b4b4)

Tff7b72package T7ee787org.meshtastic.feature.node.component

Tff7b72import T7ee787androidx.compose.material3.Surface
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.runtime.remember
Tff7b72import T7ee787androidx.compose.ui.tooling.preview.PreviewLightDark
Tff7b72import T7ee787org.meshtastic.core.model.Node
Tff7b72import T7ee787org.meshtastic.core.ui.theme.AppTheme

T8b949e// A spread of hop distances with hop 4 intentionally missing, to show the preserved zero-count gap.
T8b949e// Built inside a function (not an eager top-level val) so it can't poison this file's class initializer.
Tff7b72private Tff7b72fun Td2a8ffsampleNodesTb4b4b4(Tb4b4b4)Tb4b4b4: Te6edf3ListTff7b72<Te6edf3NodeTff7b72> Tff7b72= Te6edf3buildList Tb4b4b4{
Te6edf3listOfTb4b4b4(T79c0ff0 Te6edf3to T79c0ff8Tb4b4b4, T79c0ff1 Te6edf3to T79c0ff1T79c0ff2Tb4b4b4, T79c0ff2 Te6edf3to T79c0ff5Tb4b4b4, T79c0ff3 Te6edf3to T79c0ff2Tb4b4b4, T79c0ff5 Te6edf3to T79c0ff3Tb4b4b4)Tb4b4b4.Te6edf3forEach Tb4b4b4{ Tb4b4b4(Te6edf3hopTb4b4b4, Te6edf3countTb4b4b4) Tff7b72-Tff7b72>
Te6edf3repeatTb4b4b4(Te6edf3countTb4b4b4) Tb4b4b4{ Te6edf3i Tff7b72-Tff7b72> Te6edf3addTb4b4b4(Te6edf3NodeTb4b4b4(Te6edf3num Tff7b72= Te6edf3hop Tff7b72* T79c0ff1T79c0ff0T79c0ff0T79c0ff0 Tff7b72+ Te6edf3iTb4b4b4, Te6edf3hopsAway Tff7b72= Te6edf3hopTb4b4b4)Tb4b4b4) Tb4b4b4}
Tb4b4b4}
Tb4b4b4}

Tf0883e@PreviewLightDark
Tf0883e@Composable
Tff7b72fun Td2a8ffHopHistogramContentPreviewTb4b4b4(Tb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3nodes Tff7b72= Te6edf3remember Tb4b4b4{ Te6edf3sampleNodesTb4b4b4(Tb4b4b4) Tb4b4b4}
Te6edf3AppTheme Tb4b4b4{ Te6edf3Surface Tb4b4b4{ Te6edf3HopHistogramContentTb4b4b4(Te6edf3nodes Tff7b72= Te6edf3nodesTb4b4b4, Te6edf3window Tff7b72= Te6edf3HopWindowTb4b4b4.Te6edf3ALLTb4b4b4, Te6edf3onSelectWindow Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4) Tb4b4b4} Tb4b4b4}
Tb4b4b4}

Tf0883e@PreviewLightDark
Tf0883e@Composable
Tff7b72fun Td2a8ffHopHistogramEmptyPreviewTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3AppTheme Tb4b4b4{ Te6edf3Surface Tb4b4b4{ Te6edf3HopHistogramContentTb4b4b4(Te6edf3nodes Tff7b72= Te6edf3emptyListTb4b4b4(Tb4b4b4)Tb4b4b4, Te6edf3window Tff7b72= Te6edf3HopWindowTb4b4b4.Te6edf3ALLTb4b4b4, Te6edf3onSelectWindow Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4) Tb4b4b4} Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.1s